package com.senjoeson.abilityservice.action;

import com.senjoeson.abilityservice.ActionDelegate;
import com.senjoeson.abilityservice.ActionDelegateImpl;
import com.senjoeson.abilityservice.service.AutoAccessibilityService;

/**
 * @USER senjoeson
 * @DATE 2021/1/31 10:32 下午
 * @Desc
 **/
public class ClickUserActionImpl extends ZeroActionContext implements ClickUserAction {

    private ActionDelegate actionDelegate;

    public ClickUserActionImpl(AutoAccessibilityService autoAccessibilityService) {
        super(autoAccessibilityService);
        actionDelegate = new ActionDelegateImpl(autoAccessibilityService);
    }

    @Override
    public boolean ifFoundTextAndClick(String text) {
        return actionDelegate.findText(text);

    }

    @Override
    public boolean swipeLeft() {
        return actionDelegate.swipeLeft();
    }
}
